home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- ** $Id: qprogressdialog.h,v 2.15 1998/07/03 00:09:29 hanord Exp $
- **
- ** Definition of QProgressDialog class
- **
- ** Created : 970520
- **
- ** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved.
- **
- ** This file is part of Qt Free Edition, version 1.40.
- **
- ** See the file LICENSE included in the distribution for the usage
- ** and distribution terms, or http://www.troll.no/free-license.html.
- **
- ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
- ** your own programs or libraries.
- **
- ** Please see http://www.troll.no/pricing.html for information about
- ** Qt Professional Edition, which is this same library but with a
- ** license which allows creation of commercial/proprietary software.
- **
- *****************************************************************************/
-
- #ifndef QPROGRESSDIALOG_H
- #define QPROGRESSDIALOG_H
-
- #ifndef QT_H
- #include "qsemimodal.h"
- #include "qpushbutton.h"
- #include "qlabel.h"
- #include "qprogressbar.h"
- #endif // QT_H
-
- struct QProgressData;
-
-
- class QProgressDialog : public QSemiModal
- {
- Q_OBJECT
- public:
- QProgressDialog( QWidget *parent=0, const char *name=0, bool modal=FALSE,
- WFlags f=0 );
- QProgressDialog( const char *labelText, const char *cancelButtonText,
- int totalSteps, QWidget *parent=0, const char *name=0,
- bool modal=FALSE, WFlags f=0 );
- ~QProgressDialog();
-
- void setLabel( QLabel * );
- void setCancelButton( QPushButton * );
- void setBar( QProgressBar * );
-
- bool wasCancelled() const;
-
- int totalSteps() const;
- int progress() const;
-
- QSize sizeHint() const;
-
- public slots:
- void cancel();
- void reset();
- void setTotalSteps( int totalSteps );
- void setProgress( int progress );
- void setLabelText( const char * );
- void setCancelButtonText( const char * );
-
- signals:
- void cancelled();
-
- protected:
- void resizeEvent( QResizeEvent * );
- void styleChange(GUIStyle);
-
- private:
- void init( QWidget *creator, const char* lbl, const char* canc,
- int totstps);
- void center();
- void layout();
- QLabel *label() const;
- QProgressBar *bar() const;
- QProgressData *d;
-
- private: // Disabled copy constructor and operator=
- QProgressDialog( const QProgressDialog & );
- QProgressDialog &operator=( const QProgressDialog & );
- };
-
-
- #endif // QPROGRESSDIALOG_H
-